Lesson 0008 · ~12 min
Layers, residuals, and MLPs
Core idea: A transformer is a stack of layers, each combining attention, per-token computation, and residual updates.
What to remember
- Attention mixes information across tokens.
- MLPs transform each token individually.
- Residuals preserve and refine earlier representations.
Why it matters
Depth lets the model build progressively more abstract and useful representations.
Mental model
Each layer says: gather relevant context, process it, then add a learned adjustment to what you already had.
Checkpoint
- Why use multiple layers?
- What does a residual connection do in plain English?
- How do attention and the MLP differ?